export const getApiList = (obj: any) => {
    console.log(obj);

    return `
import request from '@/utils/request'

// 获取列表
export const get${obj.modelName}List = (params: any) => {
    return request('/api/${obj.modelName}', 'get', params)
}

// 添加
export const add${obj.modelName} = (data: any) => {
    return request('/api/${obj.modelName}', 'post', data)
}

// 编辑
export const edit${obj.modelName} = (id: any, data: any) => {
    return request("/api/${obj.modelName}/{id}", 'put', data)
}

// 删除
export const delete${obj.modelName} = (id: any) => {
    return request("/api/${obj.modelName}/{id}", 'delete')
}
`

}


